package com.xiaohei.crm.common.result;

import lombok.Getter;

/**
 * ClassName: ResultCodeEnum
 * Package:
 * Description:
 *
 * @Author:xiaohei
 * @Create 2024/4/21 21:54
 * Version 1.0
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200,"成功"),
    FAIL(201, "失败"),
    USER_IS_NULL(202,"用户信息为空"),
    ROLE_IS_AlREADY(205,"角色已存在"),
    SERVICE_ERROR(2012, "服务异常"),
    LOGIN_ERROR(203,"认证失败"),
    DATA_ERROR(204, "数据异常"),
    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),
    ACCOUNT_STOP(210, "账号停用"),
    USER_ALREADY_EXISTS(211,"用户已存在"),
    CLIENT_EXCEPTION(50001,"服务器内部异常"),
    ROLE_HAS_USER_ALREADY_USE(212,"仍然有被赋予该角色的成员"),
    REGION_HAS_USER_ALREADY_USE(212,"仍然有角色属于该地区"),
    REGION_HAS_MATERIAL_ALREADY_USE(212,"仍然有设备属于该地区"),
    REGION_HAS_INVENTORY_ALREADY_USE(212,"仍然有库存属于该地区"),
    REGION_HAS_ES_ALREADY_USE(212,"仍然有业务属于该地区"),
    REGION_HAS_CUSTOMER_ALREADY_USE(212,"仍然有用户属于该地区"),
    REGION_IS_ALREADY_EXIST(213,"区域信息已经存在"),
    USER_IS_NOT_EXIST(214,"用户不存在"),
    USER_LOGIN_TOO_FAST(217,"访问速度过快，请稍后再试");


    private Integer code;
    private String message;
    private ResultCodeEnum(Integer code,String message) {
        this.code = code;
        this.message = message;
    }
}
